package com.fqgj.xjd.user.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.xjd.user.dao.UserAuthFaceRecognitionDao;
import com.fqgj.xjd.user.entity.UserAuthFaceRecognitionEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: zhangxingyun
* Date: 2017-07-20
* Time: 18:38:52.950
*/

@Repository
public class UserAuthFaceRecognitionDaoImpl extends AbstractBaseMapper<UserAuthFaceRecognitionEntity> implements UserAuthFaceRecognitionDao {

    @Override
    public UserAuthFaceRecognitionEntity selectUserAuthFaceRecognitionByUserCodeAndType(String userCode, Integer type) {
        Map params = new HashMap();
        params.put("userCode",userCode);
        params.put("type",type);
        return getSqlSession().selectOne(getStatement("selectUserAuthFaceRecognitionByUserCodeAndType"),params);
    }

    @Override
    public List<UserAuthFaceRecognitionEntity> selectUserAuthFaceRecognitionByUserCode(String userCode) {
        return getSqlSession().selectList(getStatement("selectUserAuthFaceRecognitionByUserCode"),userCode);
    }
}